package linwen.wang.common.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import lombok.Data;

import java.util.Date;

/**
 * @ClassName BaseEntity
 * @Description entity公共属性
 * @Author zero
 * @DATE 2024/6/3 3:35 AM
 * @Version 1.0
 */
@Data
public class BaseEntity {
    @TableId
    private Long id;

    @TableField("version")
    private String version;

    @TableLogic(value = "N", delval = "Y")
    private String delFlag;

    @TableField(value = "created_by", fill = FieldFill.INSERT)
    private String createdBy;

    @TableField(value = "created_time", fill = FieldFill.INSERT)
    private Date createdTime;

    @TableField(value = "updated_by", fill = FieldFill.INSERT_UPDATE)
    private String updatedBy;

    @TableField(value = "updated_time", fill = FieldFill.INSERT_UPDATE)
    private Date updatedDate;
}
